package cn.changeforyou.web.cloud.auth.entity;

import cn.changeforyou.web.cloud.webBase.model.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 用户表
 * @TableName user
 */
@TableName(value ="user")
@Data
public class User extends BaseEntity implements Serializable {
    /**
     * 
     */
    @NotBlank
    private String nickname;

    /**
     * 
     */
    @NotBlank
    private String phone;

    /**
     * 类型, 1:本地用户
     */
    @NotNull
    private Integer type;

    @TableField(exist = false)
    private String typeName;

    /**
     *
     */
    @NotBlank
    private String password;

    /**
     * 
     */
    @NotBlank
    private String username;

    /**
     * 
     */
    private String memo;

    /**
     * 关联id(默认用户没有关联id)
     */
    private String refId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}